home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Prog / D-G / FORTRAN Goodies.sit / FORTRAN Goodies / String Utilities / invert.f < prev    next >
MacBinary  |  1990-12-05  |  1.8 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: invert.f

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Freeze Frozen Compressed File (archive/freeze) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert MathVISION Formula (other/mathVISIONFormula) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Dec 5 12:04:48 1990, modified Wed Dec 5 12:04:48 1990, creator 'MPS ', type ASCII, 1166 bytes "invert.f" , at 0x50e 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 69 6e 76 65 72 74 | 2e 66 00 00 00 00 00 00 |..invert|.f......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 04 8e 00 | 00 01 7e a3 82 d9 30 a3 |........|..~...0.|
|00000060| 82 d9 30 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..0.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 68 70 00 00 |........|....hp..|
|00000080| 63 0d 63 09 54 68 69 73 | 20 65 78 61 6d 70 6c 65 |c.c.This| example|
|00000090| 20 69 6e 76 65 72 74 73 | 20 61 20 73 74 72 69 6e | inverts| a strin|
|000000a0| 67 2e 0d 63 0d 63 09 20 | 20 46 75 6e 63 74 69 6f |g..c.c. | Functio|
|000000b0| 6e 20 49 4e 56 45 52 54 | 0d 63 09 09 54 61 6b 65 |n INVERT|.c..Take|
|000000c0| 73 20 61 20 73 74 72 69 | 6e 67 20 61 72 67 75 6d |s a stri|ng argum|
|000000d0| 65 6e 74 2e 0d 63 09 09 | 52 65 74 75 72 6e 73 20 |ent..c..|Returns |
|000000e0| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 77 69 74 |the argu|ment wit|
|000000f0| 68 20 74 68 65 20 6c 65 | 74 74 65 72 73 20 69 6e |h the le|tters in|
|00000100| 20 74 68 65 20 72 65 76 | 65 72 73 65 20 6f 72 64 | the rev|erse ord|
|00000110| 65 72 2e 0d 63 0d 63 0d | 63 09 45 78 61 6d 70 6c |er..c.c.|c.Exampl|
|00000120| 65 20 70 72 6f 76 69 64 | 65 64 20 66 6f 72 20 6f |e provid|ed for o|
|00000130| 77 6e 65 72 73 20 6f 66 | 20 4c 61 6e 67 75 61 67 |wners of| Languag|
|00000140| 65 20 53 79 73 74 65 6d | 73 20 46 4f 52 54 52 41 |e System|s FORTRA|
|00000150| 4e 0d 63 09 a9 ca 31 39 | 39 30 20 4c 61 6e 67 75 |N.c...19|90 Langu|
|00000160| 61 67 65 20 53 79 73 74 | 65 6d 73 20 43 6f 72 70 |age Syst|ems Corp|
|00000170| 2e 0d 63 0d 63 09 57 72 | 69 74 74 65 6e 20 62 79 |..c.c.Wr|itten by|
|00000180| 20 53 74 65 76 65 6e 20 | 48 6f 70 6b 69 6e 73 0d | Steven |Hopkins.|
|00000190| 63 0d 09 73 74 72 69 6e | 67 20 66 75 6e 63 74 69 |c..strin|g functi|
|000001a0| 6f 6e 20 49 4e 56 45 52 | 54 28 53 74 72 41 72 67 |on INVER|T(StrArg|
|000001b0| 29 0d 09 69 6d 70 6c 69 | 63 69 74 20 6e 6f 6e 65 |)..impli|cit none|
|000001c0| 0d 0d 43 09 09 72 65 63 | 65 69 76 65 20 74 68 65 |..C..rec|eive the|
|000001d0| 20 61 72 67 75 6d 65 6e | 74 20 62 79 20 44 65 73 | argumen|t by Des|
|000001e0| 63 72 69 70 74 6f 72 0d | 0d 09 73 74 72 75 63 74 |criptor.|..struct|
|000001f0| 75 72 65 20 2f 44 65 73 | 63 52 65 63 2f 0d 09 09 |ure /Des|cRec/...|
|00000200| 70 6f 69 6e 74 65 72 20 | 2f 63 68 61 72 61 63 74 |pointer |/charact|
|00000210| 65 72 2a 31 2f 20 44 61 | 74 61 50 74 72 0d 09 09 |er*1/ Da|taPtr...|
|00000220| 69 6e 74 65 67 65 72 2a | 32 20 44 61 74 61 53 69 |integer*|2 DataSi|
|00000230| 7a 65 0d 09 09 69 6e 74 | 65 67 65 72 2a 32 20 53 |ze...int|eger*2 S|
|00000240| 79 6d 54 0d 09 65 6e 64 | 20 73 74 72 75 63 74 75 |ymT..end| structu|
|00000250| 72 65 0d 09 72 65 63 6f | 72 64 20 2f 44 65 73 63 |re..reco|rd /Desc|
|00000260| 52 65 63 2f 20 53 74 72 | 41 72 67 0d 0d 43 09 09 |Rec/ Str|Arg..C..|
|00000270| 6c 6f 63 61 6c 20 64 65 | 63 6c 61 72 61 74 69 6f |local de|claratio|
|00000280| 6e 73 0d 0d 09 73 74 72 | 69 6e 67 09 09 72 65 73 |ns...str|ing..res|
|00000290| 75 6c 74 0d 09 69 6e 74 | 65 67 65 72 2a 34 09 6c |ult..int|eger*4.l|
|000002a0| 69 6d 69 74 2c 6c 65 6e | 0d 09 70 6f 69 6e 74 65 |imit,len|..pointe|
|000002b0| 72 20 09 2f 62 79 74 65 | 2f 20 73 74 72 70 74 72 |r ./byte|/ strptr|
|000002c0| 2c 20 61 72 67 70 74 72 | 0d 0d 43 09 09 73 65 74 |, argptr|..C..set|
|000002d0| 20 75 70 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 | up poin|ter to t|
|000002e0| 68 65 20 73 74 72 69 6e | 67 20 61 72 67 75 6d 65 |he strin|g argume|
|000002f0| 6e 74 0d 0d 09 61 72 67 | 70 74 72 20 3d 20 53 74 |nt...arg|ptr = St|
|00000300| 72 41 72 67 2e 44 61 74 | 61 50 74 72 0d 0d 43 09 |rArg.Dat|aPtr..C.|
|00000310| 09 72 65 61 64 20 74 68 | 65 20 63 75 72 72 65 6e |.read th|e curren|
|00000320| 74 20 6c 65 6e 67 74 68 | 0d 0d 09 6c 65 6e 20 3d |t length|...len =|
|00000330| 20 61 72 67 70 74 72 5e | 0d 09 0d 43 09 09 73 65 | argptr^|...C..se|
|00000340| 74 20 75 70 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |t up poi|nter to |
|00000350| 74 68 65 20 6c 6f 63 61 | 6c 20 72 65 73 75 6c 74 |the loca|l result|
|00000360| 20 76 61 72 69 61 62 6c | 65 0d 0d 09 73 74 72 70 | variabl|e...strp|
|00000370| 74 72 20 3d 20 25 6c 6f | 63 28 72 65 73 75 6c 74 |tr = %lo|c(result|
|00000380| 29 0d 0d 43 09 09 63 6f | 70 79 20 74 68 65 20 6c |)..C..co|py the l|
|00000390| 65 6e 67 74 68 20 62 79 | 74 65 20 69 6e 74 6f 20 |ength by|te into |
|000003a0| 74 68 65 20 72 65 73 75 | 6c 74 0d 0d 09 73 74 72 |the resu|lt...str|
|000003b0| 70 74 72 5e 20 3d 20 61 | 72 67 70 74 72 5e 0d 09 |ptr^ = a|rgptr^..|
|000003c0| 73 74 72 70 74 72 20 3d | 20 73 74 72 70 74 72 20 |strptr =| strptr |
|000003d0| 2b 20 31 0d 0d 43 09 09 | 70 6f 69 6e 74 20 74 6f |+ 1..C..|point to|
|000003e0| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|000003f0| 61 72 67 75 6d 65 6e 74 | 0d 0d 09 61 72 67 70 74 |argument|...argpt|
|00000400| 72 20 3d 20 61 72 67 70 | 74 72 20 2b 20 6c 65 6e |r = argp|tr + len|
|00000410| 0d 0d 43 09 09 73 74 6f | 72 65 20 74 68 65 20 61 |..C..sto|re the a|
|00000420| 72 67 75 6d 65 6e 74 20 | 63 68 61 72 61 63 74 65 |rgument |characte|
|00000430| 72 20 62 79 20 63 68 61 | 72 61 63 74 65 72 20 69 |r by cha|racter i|
|00000440| 6e 74 6f 20 74 68 65 0d | 43 09 09 6c 6f 63 61 6c |nto the.|C..local|
|00000450| 20 73 74 72 69 6e 67 0d | 0d 09 6c 69 6d 69 74 20 | string.|..limit |
|00000460| 3d 20 25 6c 6f 63 28 72 | 65 73 75 6c 74 29 20 2b |= %loc(r|esult) +|
|00000470| 20 6c 65 6e 0d 09 64 6f | 20 77 68 69 6c 65 20 28 | len..do| while (|
|00000480| 73 74 72 70 74 72 20 3c | 3d 20 6c 69 6d 69 74 29 |strptr <|= limit)|
|00000490| 0d 09 09 73 74 72 70 74 | 72 5e 20 3d 20 61 72 67 |...strpt|r^ = arg|
|000004a0| 70 74 72 5e 0d 09 09 61 | 72 67 70 74 72 20 3d 20 |ptr^...a|rgptr = |
|000004b0| 61 72 67 70 74 72 20 2d | 20 31 0d 09 09 73 74 72 |argptr -| 1...str|
|000004c0| 70 74 72 20 3d 20 73 74 | 72 70 74 72 20 2b 20 31 |ptr = st|rptr + 1|
|000004d0| 0d 09 65 6e 64 20 64 6f | 0d 0d 43 09 09 72 65 74 |..end do|..C..ret|
|000004e0| 75 72 6e 20 74 68 65 20 | 69 6e 76 65 72 74 65 64 |urn the |inverted|
|000004f0| 20 73 74 72 69 6e 67 0d | 0d 09 69 6e 76 65 72 74 | string.|..invert|
|00000500| 20 3d 20 72 65 73 75 6c | 74 0d 09 65 6e 64 00 00 | = resul|t..end..|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000590| 00 00 00 02 07 4c 53 50 | 20 33 2e 30 01 00 00 00 |.....LSP| 3.0....|
|000005a0| 00 12 00 00 b1 24 a1 45 | bf a5 a2 99 75 6a 00 00 |.....$.E|....uj..|
|000005b0| 08 69 6e 76 65 72 74 2e | 66 00 02 00 00 00 50 61 |.invert.|f.....Pa|
|000005c0| 72 74 53 49 54 78 00 00 | 00 00 00 00 00 00 00 01 |rtSITx..|........|
|000005d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 a9 80 18 cf 00 00 | 00 00 00 00 01 7e 90 ec |........|.....~..|
|00000600| a1 ff 02 27 a3 1d 4d 32 | 00 00 00 00 00 3e 00 0e |...'..M2|.....>..|
|00000610| 00 e5 01 86 01 00 00 c0 | 00 40 01 00 ff f8 ff d4 |........|.@......|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 16 00 00 00 |........|........|
|00000640| 00 02 10 4d 61 63 57 72 | 69 74 65 20 49 49 20 54 |...MacWr|ite II T|
|00000650| 65 6d 70 49 02 00 00 00 | 4d 57 32 54 4d 57 49 49 |empI....|MW2TMWII|
|00000660| 40 00 00 00 00 00 00 00 | 00 01 89 34 00 00 00 00 |@.......|...4....|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000680| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 3c 00 24 |...H..Mo|naco.<.$|
|00000690| 00 3c 01 ee 01 44 00 24 | 01 44 01 ee 7f f5 80 0a |.<...D.$|.D......|
|000006a0| 7f f5 7f f5 00 00 00 06 | 00 04 00 40 00 10 00 c8 |........|...@....|
|000006b0| 01 c9 00 40 00 10 00 c8 | 01 c9 a3 82 92 e0 00 00 |...@....|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|000006d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 2d cc 74 |...L...L|...2.-.t|
|000006e0| 05 e2 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000006f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 2f 72 e4 00 00 |........|.../r...|
+--------+-------------------------+-------------------------+--------+--------+